<!-- 数字 -->
<template>
	<div class="statistic">
		<!-- [currency || "KZT"] -->
		<!-- <view class="currency" v-if="currency !== 'KZT'">{{
			currencyType["KZT"].value
		}}</view> -->
		<!-- :separator="separator" -->
		<u-count-to
			:endVal="value"
			:separator="separator"
			:duration="1"
			:decimals="decimals"
		></u-count-to>
		<!-- v-if="currency === 'KZT'" -->
		<!-- class="currency" -->
		<view>&nbsp;{{ currencyType["KZT"].value }}</view>
	</div>
</template>

<script>
export default {
	props: {
		separator: {
			type: String,
			default: " ",
		},
		decimals: {
			type: Number,
			default: 0,
		},
		value: {
			type: [String, Number],
			default: 0,
		},
		currency: {
			type: String,
			default: "",
		},
		valueStyle: {
			type: Object,
			default: () => {},
		},
	},
	data() {
		return {
			currencyType: {
				CNY: {
					label: "人民币",
					value: "￥",
				},
				RUB: {
					label: "卢布",
					value: "₽",
				},
				USD: {
					label: "美元",
					value: "$",
				},
				KZT: {
					label: "坚戈",
					value: "₸",
				},
			},
		};
	},
	mounted() {},
};
</script>
<style lang="scss" scoped>
.statistic {
	display: inline-flex;
	align-items: center;
}
.u-count-num {
	color: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
}
.currency {
	transform: scale(0.8);
}
</style>
